package cn.edu.swu.dlx;

import java.util.Scanner;

public class Game {
    public static void main(String[] args) {
        Role role1 = new Role("张三", 100,100);
        Role role2 = new Role("李四", 100,100);
        int attackMethod = 0;

        while (role1.getBlood() > 0 && role2.getBlood() > 0){
            System.out.println((role1.getName()));
            System.out.println(role1.getName()+"有"+role1.getSillcount()+"个技能点");
            role1.attack(role2,role1);
            if (role2.getBlood() <= 0) {
                System.out.println(role1.getName()+"胜出，还剩"+role1.getBlood()+"点血量");
                break;
            }
            System.out.println((role2.getName()));
            System.out.println(role2.getName()+"有"+role2.getSillcount()+"个技能点");
            role2.attack(role1,role2);
            if (role1.getBlood() <= 0) {
                System.out.println(role2.getName()+"胜出，还剩"+role2.getBlood()+"点血量");
                break;
            }
        }
    }
}
